// some ideas about functions to have

function selector_escape(sel){
    if (sel[0]=='#') {
        
    }

}


function load_url_from_data(id){}


function toggle_by_selector_and_checked() {}
function send_user_prefs_update() {}

function set_var_by_user_pref(){}

function set_checkbox_by_user_pref(){}

// worth attention -- data binding
// http://forum.jquery.com/topic/proposal-for-adding-data-linking-to-jquery

function set_visibility_by_checkbox(checkbox_slector, targets_selector) {
        // http://jquery-howto.blogspot.com/2008/12/how-to-check-if-checkbox-is-checked.html
        $(checkbox_selector).each( function (){
            if ( $(this).is(':checked'))  $(targets_selector).show();
            else $(targets_selector).hide();
               } );
}

function set_visibility_by_checkbox_with_targets_in_data(checkbox_selector) {
        // http://jquery-howto.blogspot.com/2008/12/how-to-check-if-checkbox-is-checked.html
        $(checkbox_selector).each( function (){
            var targets_selector= $(this).data('targets_selector');
            if ( $(this).is(':checked') )
                $(targets_selector).show();
            else
                $(targets_selector).hide();
               } );
}
